Toolbar for the grid.

<div class="definition">
    Object, default = null
</div>

Each grid comes with a toolbar. The <span class="property">.toolbar</span> property should be initiated during
object creation because after the object is created, the w2toolbar is created too. During object creation you can add additional
buttons to the toolbar in the following way:

<textarea class="javascript">
let grid = new w2grid({
    name    : 'grid',
    header  : 'Grid Header',
    show : {
        toolbar : true
    },
    toolbar: {
        items: [
            { type: 'break' },
            { type: 'button', id: 'mybutton', text: 'My other button', img: 'icon-folder' }
        ],
        onClick: function (target, data) {
            console.log(target);
        }
    },
    columns: [
        { field: 'recid', text: 'ID', size: '50px' },
        { field: 'lname', text: 'Last Name', size: '30%' },
        { field: 'fname', text: 'First Name', size: '30%' },
        { field: 'email', text: 'Email', size: '40%' },
        { field: 'sdate', text: 'Start Date', size: '120px' },
        { field: 'sdate', text: 'End Date', size: '120px' }
    ]
});
</textarea>

Please note, that by default toolbar is hidden. You need to set <a class="property" href="w2grid.show">.show.toolbar</a> property to true in order to make
toolbar visible. There are also several default toolbar buttons that can be hidden or shown during object creation. They are all part of the
<a class="property" href="w2grid.show">.show</a> property of the grid. Below is the <a class="property" href="w2grid.show">.show</a> property of the grid with items
relevant to the toolbar with its default values:

<textarea class="javascript">
show = {
    ...
    toolbar         : false,
    toolbarReload   : true,
    toolbarColumns  : true,
    toolbarSearch   : true,
    toolbarAdd      : false,
    toolbarDelete   : false,
    toolbarSave     : false
}
</textarea>

There are other items in the <a class="property" href="w2grid.show">.show</a> property besides those relevant to toolbar.
<div style="height: 10px"></div>

<h3>Auto enable/disable toolbar buttons</h3>

Toolbar items might have optional <span class="property">.batch</span> property. If it is a positive integer, then the button will only
be enabled if same number of records is selected in the grid. If it is true (used to be if it is 0), it will only be enabled if at least one record
is selected. It also can be a function, so that if selection changes, you can determine if button should be enabled or disabled.

<h3>Toolbar object</h3>

Once the grid object has been created, the <span class="property">.toolbar</span> property becomes w2toolbar object. The name of this
object is the name of the grid + '_toolbar'. If you have the grid created, you can access w2toolbar object in the following way:

<textarea class="javascript">
grid.toolbar.disable('mybutton');
</textarea>

or

<textarea class="javascript">
w2ui['grid_toolbar'].disable('mybutton');
</textarea>